<template><div>
<p>儿子,我的名字是:{{snname2}}</p>
 <p>我的朋友名字:{{pyname}}</p>
 <button @click="fsn">点击告诉巴巴我的朋友名字:{{pyname}}</button>
</div>
</template>

<script>
export default {
  methods: {
    fsn () {
      this.$emit('cangetname', this.pyname)
    }

  },
  data () {
    return {
      pyname: '爱伦'
    }
  },

  props: ['snname2']

}
</script>

<style>

</style>
